﻿using System;
using System.Globalization;
using Avalonia.Data.Converters;

namespace TCP232.Converters;

public class IsReceiveConverter: IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (System.Convert.ToBoolean(value))
        {
            return "接收";
        }
        else
        {
            return "发送";
        }
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}